package com.kf.smartpark.app

import com.alibaba.android.arouter.launcher.ARouter
import com.bw.baseapplicatio.BaseApplication
import com.kf.lib_imageload.imageload_sdk.GlideApp
import com.tencent.smtt.sdk.QbSdk

class App : BaseApplication() {

    override fun onTrimMemory(level: Int) {
        super.onTrimMemory(level)
        if (level == TRIM_MEMORY_RUNNING_LOW) {
            GlideApp.get(this).clearMemory();
        }
    }

    override fun onCreate() {
        super.onCreate()
        ARouter.openDebug()
        ARouter.openLog()
        ARouter.init(this)

        /* 设置允许移动网络下进行内核下载。默认不下载，会导致部分一直用移动网络的用户无法使用x5内核 */
        QbSdk.setDownloadWithoutWifi(true)
        QbSdk.initX5Environment(this, object : QbSdk.PreInitCallback {
            override fun onCoreInitFinished() {
            }

            override fun onViewInitFinished(p0: Boolean) {
            }
        })

    }

}